package bancosys.tec.rtm.exception.util;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.OutputStream;

/**
 * @author Koji Avoid file header problems
 */
public class ReuseObjectOutputStream extends ObjectOutputStream {

    /**
     * C'tor
     * 
     * @param out {@link OutputStream}
     * @throws IOException e
     */
    public ReuseObjectOutputStream(OutputStream out) throws IOException {
        super(out);
    }

    /**
     * Resets the ObjectOutputStream - clear internal cache
     * 
     * @throws IOException e
     */
    @Override
    protected void writeStreamHeader() throws IOException {
        this.reset();
    }
}
